//
//  ZKTransitionInteractiveConfig.h
//  朱凯的工具箱
//
//  Created by pro on 17/5/12.
//  Copyright © 2017年 zhukai. All rights reserved.
//

#import <UIKit/UIKit.h>



typedef enum : NSUInteger {
    KZTransitionInteractiveDirectionLeft,           // right -> left
    KZTransitionInteractiveDirectionRight,          // left  -> right
    KZTransitionInteractiveDirectionUp,             // down  -> up
    KZTransitionInteractiveDirectionDown,           // up    -> down
} KZTransitionInteractiveDirection;

typedef enum : NSUInteger {
    KZTransitionInteractiveGestureTypeNormalPan,    // 普通拖动
    KZTransitionInteractiveGestureTypeEdgePan,      // 边缘拖动
} KZTransitionInteractiveGestureType;

typedef void(^KZGestureConfigFetch)(KZTransitionInteractiveGestureType type, KZTransitionInteractiveDirection direct, CGFloat usefulSize);

@interface KZTransitionInteractiveConfig : UIPercentDrivenInteractiveTransition

// 记录当前是否需要交互
@property (nonatomic, assign, readonly) BOOL interation;


- (instancetype)initWithOperation:(dispatch_block_t)operationBlock
                    gestureConfig:(void(^)(KZGestureConfigFetch fetch))gestureConfig;

- (void)addGestureToView:(UIView *)view;

@end
